<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>EnvUpdate</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>EnvUpdate</h1>

<p>Notifies the OS and all running applications that <a href="../Variables.htm#env">environment variable(s)</a> have changed.</p>

<pre class="Syntax">EnvUpdate</pre>
<h3>ErrorLevel</h3>
<p><span class="ver">[v1.1.04+]</span> This command is able to throw an exception on failure. For more information, see <a href="Catch.htm#RuntimeErrors">Runtime Errors</a>.</p>
<p><a href="../misc/ErrorLevel.htm">ErrorLevel</a> is set to 1 if there was a problem or 0 otherwise.</p>
<h3>Remarks</h3>
<p>Refreshes the OS environment. Similar effect as logging off and then on again.</p>
<p>For example, after making changes to the following registry key, EnvUpdate could be used to broadcast the change: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment</p>
<h3>Related</h3>
<p><a href="EnvSet.htm">EnvSet</a>, <a href="RegWrite.htm">RegWrite</a></p>
<h3>Example</h3>
<pre class="NoIndent">EnvUpdate</pre>

</body>
</html>
